package com.worldtolearn.user.bu;

import java.io.Serializable;

import javax.inject.Inject;

import com.worldtolearn.logging.SingletonLogger;
import com.worldtolearn.user.dao.RoleDAO;
import com.worldtolearn.user.entity.Role;

/*
 * TODO A décommenter
 */
//@Named
public class RoleBu implements IRoleBu, Serializable {
//public class RoleBu {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Inject
	RoleDAO roleDAO; // TODO + get/set
	

	@Override
	public void create(Role role) {
		roleDAO.create(role);
		SingletonLogger.monLogger.info("The user has been successfully created!");
	}

	@Override
	public Role read(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void update(Role role) {
		roleDAO.update(role);
		SingletonLogger.monLogger.info("The user has been successfully updated!");
	}

	@Override
	public void delete(Role role) {
		roleDAO.delete(role);
		SingletonLogger.monLogger.info("The user has been successfully deleted!");
	}

}